import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request

// 查询风险预案全部
export const riskPlanList = data => {
    return $get('/risk/riskPlan/list', data)
}

// 查询风险预案列表
export const riskPlanPage = data => {
    return $get('/risk/riskPlan/page', data)
}

// 新增风险预案
export const riskPlanAdd = data => {
    return $post('/risk/riskPlan/add', data)
}

// 查询风险预案详情
export const riskPlanDetail = id => {
    return $get('/risk/riskPlan/detail/'+ id)
}

// 更新风险预案
export const riskPlanUpdate = data => {
    return $post('/risk/riskPlan/update', data)
}

// 删除风险预案
export const riskPlanDelete = id => {
    return $post('/risk/riskPlan/delete/'+ id)
}

// 导出风险预案
export const riskPlanExport = (data,fileName) => {
    return $download('/risk/riskPlan/export',data, fileName)
}

// 获取预案大项列表
export const getLargeTypeNumList = (data)=>{
  return $get('/risk/riskPlan/getLargeTypeNumList', data)
}
